package command;

import interfaces.CommandTypeInfo;

import java.lang.reflect.Method;

public class CommandType implements CommandTypeInfo {

	private String command;
	private String command_description;
	private Class<?>[] param = new Class<?>[0];
	private Object target;
	private Method method;

	CommandType(String command, String description) {
		this.command = command;
		this.command_description = description;
	}

	CommandType(String command, String description, Object target,
			Method method, Class<?>... param) {
		this.command = command;
		this.command_description = description;
		this.param = param;
		this.target = target;
		this.method = method;

	}

	public String getCommandName() {
		return command;
	}

	public String getCommandDescription() {
		return command_description;
	}

	@Override
	public Class<?>[] getParamTypes() {
		return param;
	}

	@Override
	public Object getTarget() {
		return target;
	}

	@Override
	public Method getFunction() {
		return method;
	}

	@Override
	public Object getTargetObject() {

		return this.target;
	}

}
